<admintpl file="header" />
</head>
<body class="J_scroll_fixed">
	<div class="wrap J_check_wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('Event/index')}">赛事列表</a></li>
			<li><a href="{:U('Event/add')}">添加赛事</a></li>
			<li><a href="{:U('Event/team',array('gid'=>I('get.gid')))}">赛事球队</a></li>
			<li class="active"><a href="{:U('Event/addteam',array('gid'=>I('get.gid')))}">添加球队</a></li>
		</ul>
		<form class="form-horizontal J_ajaxForm" action="{:U('Event/addteam_post',array('gid'=>I('get.gid')))}" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-subcheck="true">加入赛事</button>
			</div>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="15"></th>
					<th width="30">ID</th>
					<th>班级名称</th>
					<th>班级简称</th>
					<th>入学年份</th>
					<th>球队简介</th>
					<th>邀请码</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="teaminfos" item="infos">
				<tr>
					<td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$infos.id}" title="ID:{$infos.id}"></td>
					<td>{$infos.id}</td>
					<td>
						<a href="{:U('Event/teammember',array('tid'=>$infos['id'],'gid'=>I('get.gid')))}">{$infos.team_name}
							<foreach name="users" item="user">
								<if condition="$infos['master_userid'] eq $user['id']"> - 
									{$user.user_nicename}
								</if>
							</foreach>
						</a>
					</td>
					<td>{$infos.short_name}</td>
					<td>{$infos.description1}</td>
					<td>{$infos.description2}</td>
					<td>{$infos.join_key}</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
		</form>
	</div>
</body>
</html>